package com.mapbased.sfw.util;

public class PathIterator implements java.util.Iterator<String> {

	String path;
	
	public PathIterator(String path) {
		if (path.startsWith("/")) {
			this.path = path.substring(1);
		} else
		{
			this.path = path;
		}
	}
	
	public static void test(String p){
		String [] ss=p.split("/");
		for(String s:ss){
			System.out.println("["+s+"]");
		}
		
		System.out.println("============");
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		
		test("/");
		test("//11/22/33");
		test("/sd/sdsd/sdsd/dsf/");
		test("/ss");
		test("/dd//dd");
		test("/");
		test("/");
		
		

	}

	@Override
	public boolean hasNext() {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public String next() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void remove() {
		// TODO Auto-generated method stub

	}

}
